{extend name="public/base" /}
{block name="title"}设置中心{/block}

{block name="content"}
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="panel-body" style="padding: 15px 0;">
                <ul class="nav nav-tabs">
                    <li><a href="{:url('setting')}">设置中心</a></li>
                    <li class="active"><a href="{:url('changePassword')}">密码修改</a></li>
                    <li><a href="{:url('setcover')}">封面设置</a></li>
                    <li><a href="{:url('setavatar')}">头像</a></li>
                    <li><a href="{:url('setqrcode')}">二维码设置</a></li>
                </ul>
            </div>
            <div class="panel-body">
                <form id="myform" method="post" action="{:url('changePassword')}" role="form" enctype="multipart/form-data" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">
                            <span class="text-danger">*</span>旧密码</label>
                        <div class="col-sm-4">
                            <input type="password" name="old_password" id="old_password" class="form-control" placeholder="原密码" required></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">
                            <span class="text-danger">*</span>新密码</label>
                        <div class="col-sm-4">
                            <input type="password" name="password" id="password" class="form-control" placeholder="新密码" required></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">
                            <span class="text-danger">*</span>确认密码</label>
                        <div class="col-sm-4">
                            <input type="password" name="re_password" id="re_password" class="form-control" placeholder="再次输入新密码" required></div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-3 col-sm-10">
                            <button id="form-submit" type="submit" onclick="" class="btn btn-success">保存</button></div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="/js/md5.min.js"></script>
<script type="text/javascript">  
$(document).ready(function() {
    $("#form-submit").click(function(){
        //$("#old_password").val(md5($("#old_password").val()));
        //$("#password").val(md5($("#password").val()));
        //$("#re_password").val(md5($("#re_password").val()));
        
        $("#myform").submit();
    });
});
</script>
{/block}